package test;

/**
 * @Author:zimmor
 * @Date: 2021/8/5 13:13
 * @Description
 * @version: 1.0.0
 */

public class Demo5 {
    public static void main(String[] args) {
        String str = "abfcdefg";
        int index = str.lastIndexOf("f",2);
        System.out.println("index = " + index);
    }
}
